package com.guava;

import com.google.common.base.Predicate;
import com.google.common.collect.*;
import com.google.common.primitives.Ints;
import org.checkerframework.checker.nullness.qual.Nullable;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;

/**
 * 描述:
 *
 * @author luzhongfu
 * Created by lucky on 2021-10-09 10:07 AM
 */
public class ImmutableTest {

    public static void main(String[] args) {
        ImmutableSet<String> of = ImmutableSet.of("aaa", "Bbb", "ccc");

        ImmutableSet<String> strings = ImmutableSet.copyOf(of);



        ArrayList<String> objects = Lists.newArrayList();


        ImmutableBiMap<String, Integer> of1 = ImmutableBiMap.of("1",1,"2",2,"3",3);


        Iterable<Integer> concat = Iterables.concat(Ints.asList(1,2,3));

        Iterable<Integer> filter = StreamSupport.stream(concat.spliterator(), false).filter(input -> input.equals(1)).collect(Collectors.toList());

    }
}
